<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ page import="java.util.*"%>
<%@ page import="pe.edu.upc.dew.profesoresparticulares.model.Horario"%>
<%ArrayList<Horario> horariosProfesor = (ArrayList<Horario>) request.getAttribute("horariosProfesor");%>
<%List<Map> menus = (List<Map>) request.getSession().getAttribute("MENU");%>

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Bienvenido | Profesores Particulares</title>
        <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
        <meta name="author" content="fullahead.org" />
        <meta name="keywords" content="XHTML, CSS, template, FullAhead" />
        <meta name="description" content="A valid, XHTML 1.0 template" />
        <meta name="robots" content="index, follow, noarchive" />
        <meta name="googlebot" content="noarchive" />

        <link rel="stylesheet" type="text/css" href="css/html.css" media="screen, projection, tv " />
        <link rel="stylesheet" type="text/css" href="css/layout.css" media="screen, projection, tv" />
        <link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
    </head>

    <body>
        <!-- #wrapper: centers the content and sets the width -->
        <div id="wrapper">
            <!-- #content: applies the white, dropshadow background -->
            <div id="content">
                <div id="header">
                    <h1><span class="big darkBrown">P</span>rofesores <span class="big darkBrown">P</span>articulares</h1>
                    <h2><span class="highlight">Reserva tu curso y profesor favorito en un par de clicks.</span></h2>
                </div>
                
                <ul id="menu" class="six">
                    <%for (int i = 0; i < menus.size(); i++) {%>
                    <li><a href="<%=request.getContextPath()%>/<%=((Map) menus.get(i)).get("url")%>" title="" class="here">
                            <span class="big"></span>
                            <%=((Map) menus.get(i)).get("descripcion")%>
                        </a></li>

                    <% }%>
                </ul>
                <!-- #page: holds all page content, as well as footer -->
                <div id="page">
                    <table width="500" border="1">

                        <thead>
                            <th><strong>Codigo Horario</strong></th>
                            <th><strong>Fecha</strong></th>
                            <th><strong>Hora</strong></th>
                            <th><strong>Lugar</strong></th>
                            <th><strong>Alumno</strong></th>
                        </thead>

                        <%for (Horario h : horariosProfesor) {


                        String color = "";
                        String alumno = "";
                        if(h.getNomAlumno()!=null){
                            alumno = h.getNomAlumno();
                            color = "#FFFFFF";
                        }else {
                            //    color = "#00FFFF";
                            }
                        %>

                        <tr bgcolor=<%=color%>>
                            <td> <%=h.getCodHorario()%></td>
                            <td><%=h.getFecha()%></td>
                            <td><%=h.getDescHora()%></td>
                            <td><%=h.getLugar()%></td>
                            <td><%=alumno%></td>
                        </tr>

                        <% }%>

                    </table>

                    <p class="footer">
                        Design by <a href="http://fullahead.org" title="Visit FullAhead">FullAhead</a>.  Valid CSS &amp; XHTML with no rights reserved.
                    </p>

                </div>

            </div>

        </div>

    </body>

</html>